import 'package:flutter/material.dart';

class TastePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return new MaterialApp(
      title: 'Bar',
      theme: ThemeData(
        primaryColor: Colors.white,
      ),
      home: new Scaffold(
        appBar: new AppBar(
          title: new Text('品味'),
        ),
        // body: GridView.count(
        //   padding: const EdgeInsets.all(10),
        //   crossAxisSpacing: 10,
        //   crossAxisCount: 3,
        //   children: <Widget>[
        //     const Text("呵呵"),
        //     const Text("呵呵"),
        //     const Text("呵呵"),
        //     const Text("呵呵"),
        //     const Text("呵呵"),
        //     const Text("呵呵"),
        //     const Text("呵呵"),
        //   ], 
        // )
        body:GridView(
          gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
            // 每行的数量
            crossAxisCount: 3,
            // 纵向间距
            mainAxisSpacing: 2,
            // 横向间距
            crossAxisSpacing: 2,
            // 宽高比
            childAspectRatio: .5
          ),
          children: <Widget>[
            new Image.network('http://img5.mtime.cn/mg/2018/11/30/093455.68362815_270X405X4.jpg',fit: BoxFit.cover),
            new Image.network('http://img5.mtime.cn/mg/2018/12/03/110750.30308958_270X405X4.jpg',fit: BoxFit.cover),
            new Image.network('http://img5.mtime.cn/mg/2018/12/07/100833.28705226_270X405X4.jpg',fit: BoxFit.cover),
            new Image.network('http://img5.mtime.cn/mg/2018/09/27/155850.29723647_270X405X4.jpg',fit: BoxFit.cover),
            new Image.network('http://img5.mtime.cn/mg/2018/11/29/154343.83722391_270X405X4.jpg',fit: BoxFit.cover),
            new Image.network('http://img5.mtime.cn/mg/2018/12/04/160519.43555325_270X405X4.jpg',fit: BoxFit.cover),
            new Image.network('http://img5.mtime.cn/mg/2018/12/18/163414.89646953_270X405X4.jpg',fit:BoxFit.cover),
            new Image.network('http://img5.mtime.cn/mg/2018/12/27/115010.28507653_270X405X4.jpg',fit:BoxFit.cover),
            new Image.network('http://img5.mtime.cn/mg/2018/12/06/100549.39814082_270X405X4.jpg',fit:BoxFit.cover)
          ],
        )
      ),
    );
  }
}